package com.zer0t3ch.mcServerControl;

import java.util.List;

/**
 * @author Zachary
 */
public class Main {
    static Window window;
    public Entry[] entries;
    public static String workingDirectory;
    public static String OS = (System.getProperty("os.name")).toUpperCase();
    Main main;
    static MainWindow mainwindow;
    
    /**
     * @param args the command line arguments
     */
    public static void main(String[] args) {
        init();
        MainWindow.main(args);
    }
    
    public static void init() {
        //mainwindow.listEntry.removeAll();
        //mainwindow.validate();
        if (OS.contains("WIN")) {
            workingDirectory = System.getenv("AppData");
            workingDirectory += "\\MCSM\\";
            System.out.println("This is a Windows box");
        }
        else {
            workingDirectory = System.getProperty("user.home");
            workingDirectory += "/Library/Application Support/MCSM/";
            System.out.println("This is not a Windows box");
        }
        try { DatabaseManager.sqlInit(); } catch (ClassNotFoundException e) { System.out.println(e.toString()); }
    }
    
    public static void cleanup() {
        DatabaseManager.sqlCleanup();
    }
}
